package com.cdtye.itps.cms.dao.dept.entity;


import com.baomidou.mybatisplus.annotation.TableName;
import com.cdtye.itps.models.base.model.attr.sysm.DeptAttr;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 部门
 * @author Jchen
 * @date 2021-07-08
 */
@ApiModel("部门")
@Data
@Accessors(chain = true)
@TableName("SYS_DEPT")
public class SysDept {

    @ApiModelProperty(value = "部门ID")
    private String deptId;

    @ApiModelProperty(value = "部门等级")
    private Long deptLevel;

    @ApiModelProperty(value = "部门名称")
    private String deptName;

    @ApiModelProperty(value = "部门编号")
    private String deptNo;

    @ApiModelProperty(value = "传真")
    private String fax;

    @ApiModelProperty(value = "上级部门")
    private String fid;

    @ApiModelProperty(value = "树路径")
    private String idPath;

    @ApiModelProperty(value = "是否前台业务显示  Y 显示  N 不显示")
    private String isShow;

    @ApiModelProperty(value = "是否是虚拟，如配电所、AT所等 Y-是  N-否 ")
    private String isVirtual;

    @ApiModelProperty(value = "纬度")
    private Float latitude;

    @ApiModelProperty(value = "经度")
    private Float longitude;

    @ApiModelProperty(value = "部门负责人")
    private String managerId;

    @ApiModelProperty(value = "备注信息")
    private String memo;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty(value = "铁路类别 GT：高铁，PT：普铁")
    private String railtype;

    @ApiModelProperty(value = "部门简称")
    private String shortName;

    @ApiModelProperty(value = "专业类型，JCW:接触网设备BD:变电设备DL:电力设备ZYC:作业车 TY:锅炉及通用 PD:配电设备")
    private String specialty;

    @ApiModelProperty(value = "状态  NORMAL: 正常  FROZEN:冻结")
    private String status;

    @ApiModelProperty(value = "部门运营里程")
    private Double operateKilomeaters;

    private Double orderNum;

    @ApiModelProperty(value = "共享数据中心编码")
    private String mCode;

    @ApiModelProperty(value = "数据来源")
    private String source;

    private String unitDeptCode;

    public DeptAttr getDeptAttr(){
        DeptAttr deptAttr = new DeptAttr();
        deptAttr.setDeptId(this.deptId);
        deptAttr.setDeptCode(this.deptNo);
        deptAttr.setDeptName(this.deptName);
        deptAttr.setParentId(this.fid);
        return deptAttr;
    }
}
